﻿#region Usings

using SilverBox.Helpers;

#endregion

namespace SilverBox.Extensions
{
    /// <summary>
    /// String Extension Methods.
    /// </summary>
    public static class StringExtenions
    {
        /// <summary>
        /// Indicates whether the specified System.String object is null or an System.String.Empty string.
        /// </summary>
        /// <param name="value">A System.String reference</param>
        /// <returns>true if the value parameter is null or an empty string (""); otherwise, false.</returns>
        public static bool IsEmpty(this string value)
        {
            return string.IsNullOrEmpty(value);
        }

        /// <summary>
        /// Remove HTML tags and empty newlines and spaces and leading spaces
        /// </summary>
        /// <param name="html">Html code to clear</param>
        /// <returns>Plain text</returns>
        public static string ClearHtml(this string html)
        {
            return HtmlHelper.ClearHtml(html);
        }
    }
}